Method for allocating network resource, method for connecting to target device in network, base station, and terminal device

ABSTRACT

The present application discloses a method for allocating a network resource, a method for connecting to a target device in a network, a base station, and a terminal device. In the method for allocating a network resource, a base station receives request information sent by a first terminal device, where the request information is configured to request the base station to allocate a network resource; the base station sends, to the first terminal device, allocation information of the network resource allocated by the base station, where the allocation information is configured to indicate the network resource allocated by the base station; the first terminal device is a terminal served by a cell of the base station, and the second terminal device is a terminal that accesses the target device by using the first terminal device. Thus, a problem of network resource waste is reduced, and user experience is improved.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Application No.PCT/CN2013/075143, filed on May 3, 2013, which is hereby incorporated byreference in its entirety.

TECHNICAL FIELD

The present invention relates to the field of wireless communicationstechnologies, and in particular, to a method for allocating a networkresource, a method for connecting to a target device in a network, abase station, and a terminal device.

BACKGROUND

In a wireless communications network, if a terminal device cannot beserved by a cell of a base station, for example, the terminal device isnot located in signal coverage of the base station, the terminal deviceis located in a hole area of signal coverage of the base station, or abase station fault causes a failure in providing signal coverage for theterminal device, in these cases, the terminal device may access, byusing a terminal device served by a cell of the base station or anotherbase station, a target device in a network to perform data transmission.Such a terminal device that is served by the cell of the base station orthe another base station is referred to as cell function user equipment(CF UE), and such a terminal device that accesses the target device inthe network by using the CF UE is referred to as access user equipment(AC UE). In a device to device (D2D) protocol, an AC UE may discover aCF UE by detecting a channel of another terminal device. However, in theD2D protocol, terminal devices use their capabilities to contend fornetwork resources, and a terminal device with a stronger capabilityoccupies more network resources or preferentially occupies a networkresource. However, it is possible that the CF UE that can provide aservice of accessing a network for the AC UE cannot obtain enoughnetwork resources, which causes a case in which the AC UE cannotdiscover the CF UE or the AC UE discovers the CF UE but cannot accessthe target device in the network. For example, a CF UE that is far fromthe AC UE occupies a large quantity of network resources by contention,the AC UE cannot detect the CF UE due to a long distance, and a CF UEthat is closer to the AC UE cannot provide a service for the AC UEeither, due to a failure in acquiring enough network resources, andresource waste is caused and user experience of the AC UE is degraded.

SUMMARY

In view of the foregoing technical problem, embodiments of the presentinvention provide a method for allocating a network resource, a methodfor connecting to a target device in a network, a base station, and aterminal device.

According to a first aspect, an embodiment of the present inventionprovides a method for allocating a network resource, including:

receiving, by a base station, request information sent by a firstterminal device, where the request information is configured to requestthe base station to allocate a network resource, and the networkresource allocated by the base station is used by a second terminaldevice to access a target device by using the first terminal device; and

sending, by the base station to the first terminal device, allocationinformation of the network resource allocated by the base station, wherethe allocation information is configured to indicate the networkresource allocated by the base station; where

the first terminal device is a terminal served by a cell of the basestation, and the second terminal device is a terminal that utilizes thefirst terminal device to access the target device.

With reference to the first aspect, in a first possible implementationmanner of the first aspect, the sending, by the base station to thefirst terminal device, allocation information of the network resourceallocated by the base station includes:

sending, by the base station to the first terminal device by usingsignaling or by broadcasting, the allocation information of the networkresource allocated by the base station.

With reference to the first aspect or the first possible implementationmanner of the first aspect, in a second possible implementation manner,the network resource allocated by the base station includes a timeslot,a frequency, or a code channel used in a case in which the secondterminal device accesses the target device by using the first terminaldevice.

With reference to any one of the first aspect to the second possibleimplementation manner of the first aspect, in a third possibleimplementation manner, the method further includes:

determining, by the base station, a correspondence between a channel andthe network resource according to the network resource allocated by thebase station, where the correspondence is configured to indicate anetwork resource used by a synchronization channel, a broadcast channel,or an access channel; and

sending, by the base station, the correspondence to the first terminaldevice.

According to a second aspect, an embodiment of the present inventionprovides a method for allocating a network resource, including:

sending, by a first terminal device, request information to a basestation, where the request information is configured to request the basestation to allocate a network resource, and the network resourceallocated by the base station is used by a second terminal device toaccess a target device by using the first terminal device; and

receiving, by the first terminal device, allocation information of thenetwork resource sent by the base station, where the allocationinformation is configured to indicate the network resource allocated bythe base station when the second terminal device accesses the targetdevice by using the first terminal device; where

the first terminal device is a terminal served by a cell of the basestation, and the second terminal device is a terminal that utilizes thefirst terminal device to access the target device.

With reference to the second aspect, in a first possible implementationmanner of the second aspect, the allocation information of the networkresource allocated by the base station is sent by the base station tothe first terminal device by using signaling or by broadcasting.

With reference to the second aspect, in a second possible implementationmanner of the second aspect, the method further includes:

receiving, by the first terminal device, a correspondence that isbetween a channel and the network resource and is determined accordingto the network resource allocated by the base station, where thecorrespondence is configured to indicate a network resource used by asynchronization channel, a broadcast channel, or an access channel; and

connecting, by the first terminal device, the second terminal device tothe target device according to the correspondence.

With reference to any one of the second aspect to the second possibleimplementation manner of the second aspect, in a third possibleimplementation manner of the second aspect, the network resourceallocated by the base station includes a timeslot, a frequency, or acode channel used in a case in which the second terminal device accessesthe target device by using the first terminal device.

According to a third aspect, an embodiment of the present inventionprovides a base station, including:

a receiving unit, configured to receive request information sent by afirst terminal device, where the request information is configured torequest the base station to allocate a network resource, and the networkresource allocated by the base station is used by a second terminaldevice to access a target device by using the first terminal device; and

a first sending unit, configured to send, to the first terminal device,allocation information of the network resource allocated by the basestation, where the allocation information is configured to indicate thenetwork resource allocated by the base station; where

the first terminal device is a terminal served by a cell of the basestation, and the second terminal device is a terminal that utilizes thefirst terminal device to access the target device.

With reference to the third aspect, in a first possible implementationmanner of the third aspect, the sending unit is specifically configuredto send the allocation information of the network resource to the firstterminal device by using signaling or by broadcasting.

With reference to the third aspect or the first possible implementationmanner of the third aspect, in a second possible implementation manner,the network resource allocated by the base station includes a timeslot,a frequency, or a code channel used in a case in which the secondterminal device accesses the target device by using the first terminaldevice.

With reference to any one of the third aspect to the second possibleimplementation manner of the third aspect, in a third possibleimplementation manner, the base station further includes:

a determining unit, configured to determine a correspondence between achannel and the network resource according to the network resourceallocated by the base station, where the correspondence is configured toindicate a subframe used by a synchronization channel, a broadcastchannel, or an access channel; and

a second sending unit, configured to send the correspondence that isbetween the channel and the network resource and is determined by thedetermining unit to the first terminal device.

According to a fourth aspect, an embodiment of the present inventionprovides a first terminal device, including:

a sending unit, configured to send request information to a basestation, where the request information is configured to request the basestation to allocate a network resource, and the network resourceallocated by the base station is used by a second terminal device toaccess a target device by using the first terminal device; and

a first receiving unit, configured to receive allocation information ofthe network resource sent by the base station, where the allocationinformation is configured to indicate the network resource allocated bythe base station; where

the first terminal device is a terminal served by a cell of the basestation, and the second terminal device is a terminal that utilizes thefirst terminal device to access the target device.

With reference to the fourth aspect, in a first possible implementationmanner of the fourth aspect, the allocation information is sent by thebase station to the first terminal device by using signaling or bybroadcasting.

With reference to the fourth aspect or the first possible implementationmanner of the fourth aspect, in a second possible implementation mannerof the fourth aspect, the first terminal device further includes:

a second receiving unit, configured to receive a correspondence that isbetween a channel and the network resource and is determined accordingto the network resource allocated by the base station, where thecorrespondence is configured to indicate a subframe used by asynchronization channel, a broadcast channel, or an access channel; and

an access unit, configured to enable the second terminal device toaccess the target device according to the correspondence.

According to a fifth aspect, an embodiment of the present inventionprovides a method for connecting to a target device in a network, wherethe method includes:

determining, by a second terminal device, a network resource used by afirst terminal device, where the network resource is used by the secondterminal device to access a target device by using the first terminaldevice, and the network resource is allocated by a base station; and

connecting to, by the second terminal device, the target deviceaccording to the network resource by using the first terminal device;where

the first terminal device is a terminal served by a cell of the basestation, and the second terminal device is a terminal that utilizes thefirst terminal device to access the target device.

With reference to the fifth aspect, in a first possible implementationmanner of the fifth aspect, the connecting to, by the second terminaldevice, the target device according to the network resource by using thefirst terminal device includes:

determining, by the second terminal device, a correspondence between achannel and the network resource according to the network resource,where the correspondence is configured to indicate a network resourceused by a synchronization channel, a broadcast channel, or an accesschannel; and

connecting to, by the second terminal device, the target deviceaccording to the correspondence by using the first terminal device.

According to a sixth aspect, an embodiment of the present inventionprovides a second terminal device, including:

a determining unit, configured to determine a network resource used by afirst terminal device, where the network resource is used by the secondterminal device to access a target device by using the first terminaldevice, and the network resource is allocated by a base station;

an access unit, configured to enable the second terminal device toaccess the target device in a network according to the network resourceby using the first terminal device; where

the first terminal device is a terminal of a serving cell of the basestation, and the second terminal device is a terminal that utilizes thefirst terminal device to access the target device.

With reference to the sixth aspect, in a first possible implementationmanner of the sixth aspect, the access unit is specifically configuredto determine a correspondence between a channel and the network resourceaccording to the network resource, where the correspondence isconfigured to indicate a subframe used by a synchronization channel, abroadcast channel, or an access channel; the second terminal deviceaccesses the target device according to the correspondence by using thefirst terminal device.

In the used technical solutions provided in the embodiments of thepresent invention, a base station allocates, for a first terminaldevice, a network resource used by the first terminal device in a casein which a second terminal device accesses a target device in a networkby using the first terminal device, so as to resolve a problem that thefirst terminal device may not have enough network resources to provide aservice for the second terminal device caused by acquiring of a networkresource by using a contention mechanism. Network resources are reducedand user experience of the second terminal device is improved.

BRIEF DESCRIPTION OF DRAWINGS

To describe the technical solutions in the embodiments of the presentinvention more clearly, the following briefly introduces theaccompanying drawings required for describing the embodiments.Apparently, the accompanying drawings in the following description showmerely some embodiments of the present invention, and a person ofordinary skill in the art may still derive other drawings from theseaccompanying drawings without creative efforts.

FIG. 1 is a schematic diagram of an architecture of a communicationssystem applied in an embodiment of the present invention;

FIG. 2 is a schematic flowchart of a method for allocating a networkresource according to an embodiment of the present invention;

FIG. 3a is a schematic flowchart of a method for allocating a networkresource according to an embodiment of the present invention;

FIG. 3b is a schematic diagram of network resource allocation accordingto an embodiment of the present invention;

FIG. 4 is a schematic flowchart of a method for connecting to a targetdevice in a network according to an embodiment of the present invention;

FIG. 5 is a schematic diagram of system interaction of a method forconnecting to a target device in a network according to an embodiment ofthe present invention;

FIG. 6 is a schematic structural diagram of a base station according toan embodiment of the present invention;

FIG. 7 is a schematic structural diagram of a first terminal deviceaccording to an embodiment of the present invention;

FIG. 8 is a schematic structural diagram of a second terminal deviceaccording to an embodiment of the present invention;

FIG. 9 is a schematic structural diagram of a base station according toan embodiment of the present invention;

FIG. 10 is a schematic structural diagram of a first terminal deviceaccording to an embodiment of the present invention; and

FIG. 11 is a schematic structural diagram of a second terminal deviceaccording to an embodiment of the present invention.

DESCRIPTION OF EMBODIMENTS

The following clearly describes the technical solutions in theembodiments of the present invention with reference to the accompanyingdrawings in the embodiments of the present invention. Apparently, thedescribed embodiments are merely some but not all of the embodiments ofthe present invention. All other embodiments obtained by a person ofordinary skill in the art based on the embodiments of the presentinvention without creative efforts shall fall within the protectionscope of the present invention.

FIG. 1 is a schematic diagram of an architecture of a communicationssystem applied in an embodiment of the present invention, where thecommunications system includes: a base station, a first terminal device,and a second terminal device that accesses a network by using the firstterminal device.

A typical application scenario of this embodiment of the presentinvention is: the second terminal device may be located outside coverageof a serving cell of the base station, or may be located in a coveragehole of the coverage of the serving cell of the base station. In short,the second terminal device cannot directly receive a radio wave sent bythe base station and access a target device in a network by using theradio wave and interaction with the base station. Further, thisembodiment of the present invention may further be used in any scenarioin which a second terminal device utilizes a first terminal device toaccess a network. For example, because there is a requirement of anemergency service and a base station that provides a service for thesecond terminal device cannot meet the requirement of the emergencyservice, the second terminal device may not access the base station thatserves the second terminal device, but access, by using the firstterminal device, a base station that serves the first terminal device.

The technical solution provided in this embodiment of the presentinvention may be applied to various communications systems, such as: theGlobal System for Mobile Communications (GSM), a Code Division MultipleAccess (CDMA) system, a Wideband Code Division Multiple Access (WCDMA)system, a general packet radio service (GPRS) system, and a Long TermEvolution (LTE,) system.

A terminal device in this embodiment of the present invention may alsobe referred to as a mobile terminal, user equipment (UE), mobile userequipment, or the like. The terminal device may communicate with one ormore core networks by using a radio access network (RAN). The UE may bea mobile terminal, such as a mobile phone (or referred to as a“cellular” phone) and a computer with a mobile terminal For example, theuser equipment may be a portable, pocket-sized, handheld, computerbuilt-in, or in-vehicle mobile apparatus, which exchanges languageand/or data with the radio access network.

A base station in this embodiment of the present invention may be a basetransceiver station (BTS) in GSM or CDMA, a NodeB in WCDMA, an evolvedNodeB (eNB or e-NodeB) in LTE, a small-cell base station correspondingto a small cell, various access points (AP), or the like, which is notlimited in the present invention.

In view of the foregoing scenario, in one aspect, an embodiment of thepresent invention provides a method for allocating a network resource,and a schematic flowchart that is shown in FIG. 2 and is of the methodfor allocating a network resource includes the following content:

201. A base station receives request information sent by a firstterminal device, where the request information is configured to requestthe base station to allocate a network resource. Optionally, the networkresource may include a timeslot resource, a frequency resource, or acode channel resource.

The network resource allocated by the base station is used by a secondterminal device to access a target device by using the first terminaldevice. Optionally, the target device may be the base station to whichthe first terminal device sends the request information, or may be aneighboring base station of the base station, or the target device maybe the first terminal device, or the target device may be anycommunications device in a cell in which the first terminal device islocated.

In a process in which the base station allocates the network resource,the network resource allocated by the base station may be a timeslot, afrequency, or a code channel that is specified by the base station andis used in a case in which the second terminal device accesses thetarget device by using the first terminal device, or the networkresource allocated by the base station may be information that isreceived by the base station from a network management system or theneighboring base station of the base station and is configured toindicate a timeslot, a frequency, or a code channel used in a case inwhich the second terminal device accesses the target device by using thefirst terminal device. To avoid a conflict between network resourcesoccupied by terminals served by a cell of the base station, in theprocess in which the base station allocates the network resource, thebase station may determine whether a timeslot, a frequency, or a codechannel in the network resource that is allocated to the first terminaldevice has been occupied by another terminal device, and if thetimeslot, the frequency, or the code channel has been occupied by theanother terminal device, the base station selects a network resourceallocated to the first terminal device from an idle network resource.

202. The base station sends, to the first terminal device, allocationinformation of the network resource allocated by the base station.

The allocation information is configured to indicate the networkresource allocated by the base station.

The network resource allocated by the base station may be notified bythe base station to the first terminal device by using the allocationinformation of the network resource, and the first terminal devicedetermines, according to the allocation information of the networkresource allocated by the base station, a specific timeslot, a specificfrequency, or a specific code channel in which the first terminal deviceassists the second terminal device in connecting to the target device.

In this embodiment of the present invention, the first terminal deviceis a terminal served by a cell of the base station, and the secondterminal device is a terminal that utilizes the first terminal device toaccess the target device. The second terminal device may be the terminalserved by the cell of the base station, or may not be the terminalserved by the cell of the base station (for example, the second terminaldevice is a terminal served by a cell of another base station, or thesecond terminal device is not a terminal served by a cell of any basestation). The second terminal device in this embodiment of the presentinvention may be any terminal that utilizes the first terminal device toaccess the target device.

Optionally, the network resource allocated by the base station includesa timeslot, a frequency, or a code channel used in a case in which thesecond terminal device utilizes the first terminal device to access thetarget device.

Optionally, the foregoing method further includes: determining, by thebase station, a correspondence between a channel and the networkresource according to the network resource allocated by the basestation, where the correspondence is configured to indicate a networkresource used by a synchronization channel, a broadcast channel, or anaccess channel; and sending, by the base station, the correspondence tothe first terminal device.

Optionally, in order not to change resource utilization and schedulingof a base station in a wireless communications system, the networkresource allocated by the base station may be a timeslot, a frequency,or a code channel used by the first terminal device to perform a normalcommunication service in a cell of the base station. For example, aresource block (RB) is a typical timeslot resource and frequencyresource in an LTE system; the network resource allocated by the basestation may be an RB used by the first terminal device to access thebase station, and the second terminal device may communicate with thebase station by using an RB the same as the RB used by the firstterminal device to access the base station.

A person skilled in the art may understand that, the network resourceallocated by the base station is an idle network resource and includes aresource that can be used by the first terminal device and enables thesecond terminal device to access the target device in a network.

Optionally, the base station may send the allocation information of thenetwork resource to the first terminal device by using signaling or bybroadcasting.

In a possible implementation manner, the base station may directlybroadcast the allocation information of the network resource within thecell of the base station, instead of sending the allocation informationof the network resource to the first terminal resource after the firstterminal device requests the base station to allocate the networkresource. In this case, step 201 is not necessary. The first terminaldevice receives the allocation information from the broadcast anddetermines, according to the allocation information, a network resourcethat enables the second terminal device to access the target device inthe network.

As an example, the first terminal device is a CF UE, and the secondterminal device is an AC UE. In a case in which the CF UE assists the ACUE in connecting to a target device in a network, the CF UE requests thebase station to allocate a network resource, the base station allocatesthe network resource to the CF UE, and the CF UE determines, byreceiving allocation information of the network resource sent by thebase station, a timeslot resource, a frequency resource (for example, afrequency used in an uplink or downlink channel), or a code channelresource used in the case in which the CF UE assists the AC UE inconnecting to the target device in the network. The CF UE may receive acorrespondence between a channel and a network resource from the basestation and read from the correspondence that in which timeslot, atwhich frequency, or in which code channel an SCH (SynchronizationChannel), a BCH (Broadcast Channel), or a RACH (Random Access Channel)is used. The AC UE searches for, by monitoring a subframe (a subframe iscomprised of timeslots, for example, one subframe is comprised of atleast two timeslots), a frequency or a code channel used in the case inwhich the CF UE assists the AC UE in connecting to the target device inthe network.

For example, the AC UE searches a whole spectrum or all code channels.If the AC UE detects an SCH by using a subframe, a frequency, or a codechannel, the AC UE uses the SCH to perform channel synchronization withthe CF UE in the subframe, at the frequency, or in the code channel;after the AC UE completes the channel synchronization, the AC UE maydetect a BCH corresponding to a network resource used by the CF UE, andthe AC UE reads, from the BCH corresponding to the network resource usedby the CF UE, identification information used to indicate a RACHcorresponding to the network resource used by the CF UE; the AC UE maydetermine, according to the identification information, a RACH used bythe CF UE and access the target device in the network by using the RACHused by the CF UE.

As an example, the first terminal device and the second terminal deviceare terminals served by a cell of a same base station; the firstterminal device is a multimedia server, and the second terminal deviceis a mobile phone held by a user. To obtain better user experience whenthe user uses the second terminal device to watch or listen to amultimedia service, the second terminal device may not transmit themultimedia service to the first terminal device by using the basestation, but needs to establish the transmission of the multimediaservice by directly using the first terminal device. In this case, thefirst terminal device is the target device, and the first terminaldevice may request the base station to allocate a network resource thatis used by the second terminal device to access the first terminaldevice by using the first terminal device, so that the first terminaldevice and the second terminal device may establish a multimedia serviceand do not require the base station to transfer the multimedia service.

As an example, the first terminal device is a terminal served by a cellof a base station, and the second terminal device is not a terminalserved by the cell of the base station. For example, the second terminaldevice is extremely far from the base station, which causes that thesecond terminal device cannot receive a radio signal transmitted by thebase station, and a communication service cannot be performed. If thesecond terminal device needs to perform a communication service and candiscover the first terminal device, the second terminal device canaccess the base station or a neighboring base station of the basestation by using the first terminal device and initiate a service. Thefirst terminal device may request the base station to allocate a networkresource used by the second terminal device to access the base stationor the neighboring base station of the base station. In this case, thetarget device is the base station or the neighboring base station of thebase station. For the second terminal device, a function of the firstterminal device is similar to a “relay” or a “remote antenna” of thesecond terminal device.

In the prior art, a CF UE uses its capability to acquire, in acontention manner, a network resource that is configured to assist an ACUE in connecting to a target device in a network. In a manner in whichthe CF UE uses its capability to acquire the network resource in thecontention manner, because not all network resources are scheduled andallocated by a base station, a network resource occupied by different CFUEs by using their capabilities may actually not be available and idle,and the CF UEs cannot assist the AC UE in accessing the network orcannot occupy enough network resources to serve a second terminal devicedue to their relatively weak capabilities. In the used technicalsolution provided in this embodiment of the present invention, the basestation allocates, to a first terminal device, a network resource thatis configured to assist the second terminal device in connecting to thetarget device. The network resource is not obtained in the contentionmanner by the first terminal device by using its capability. Because thebase station has a function of scheduling a terminal device served bythe base station, the base station can easily learn which networkresource is available and idle, and which network resource can moreefficiently assist the second terminal device in accessing the network.Therefore, a problem that a network resource is not properly used due tothat the network resource is occupied by the CF UE by contention isavoided. Network resources are reduced and user experience of the secondterminal device is improved.

Another aspect of embodiments of the present invention further providesa method for allocating a network resource, where the method is adetailed description of an action executed by a first terminal device inthe method embodiment shown in FIG. 2, and a concept and a process inthe method embodiment shown in FIG. 2 are also applicable to thisembodiment. FIG. 3a is a schematic flowchart of the method forallocating a network resource shown in this embodiment, including thefollowing content:

301. A first terminal device sends request information to a basestation, where the request information is configured to request the basestation to allocate a network resource, and the network resourceallocated by the base station is used by a second terminal device toaccess a target device by using the first terminal device. Optionally,the network resource includes a timeslot resource, a frequency resource,and/or a code channel resource.

302. The first terminal device receives allocation information of thenetwork resource sent by the base station, where the allocationinformation is configured to indicate the network resource allocated bythe base station.

In this embodiment, the first terminal device is a terminal served by acell of the base station, and the second terminal device is a terminalthat utilizes the first terminal device to access the target device in anetwork.

As an example, in such a case in which the second terminal device islocated in a signal coverage hole area of a serving cell of a basestation or on an edge of signal coverage of the base station, the secondterminal device cannot directly communicate with the base station toaccess the target device in the network, and the second terminal deviceneeds to communicate with another terminal device served by the cell ofthe base station, so as to access the target device in the network. Forexample, the second terminal device may request for, in a broadcastmanner, a terminal device that can provide the second terminal devicewith a service of connecting to the target device in the network. If thefirst terminal device receives a request of the second terminal deviceand determines, according to factors such as a location in which thefirst terminal device is currently located or urgency of a currentservice of the second terminal device, that the service of connecting tothe target device in the network can be provided for the second terminaldevice, the first terminal device requests the base station to allocatea network resource that is used by the second terminal device to accessthe target device in the network by using the first terminal device.After the first terminal device determines, according to the allocationinformation of the network resource received from the base station, thenetwork resource allocated by the base station, the first terminaldevice may send the allocation information of the network resource andan identifier of the first terminal device to the second terminaldevice, so that the second terminal device can learn that the networkresource is a network resource that is allocated by the base station tothe first terminal device, and is used by the first terminal device in acase in which the first terminal device assists the second terminaldevice in connecting to the target device in the network, and the secondterminal device accesses the network according to the network device byusing the first terminal device. As another example, a network (such asa network management system or a base station) may specify the firstterminal device as a terminal (that is, a CF UE) of a serving cell ofthe base station that provides the second terminal device with a serviceof connecting to the target device in the network. The first terminaldevice requests the base station to allocate a network resource, wherethe network resource is used by the second terminal device to access thetarget device in the network by using the first terminal device.Optionally, if the base station can learn in advance that the firstterminal device is the CF UE that provides the second terminal devicewith the service of connecting to the target device in the network, thebase station may also directly send, to the first terminal device, thenetwork resource allocated by the base station, instead of allocating anetwork resource to the first terminal device after the first terminaldevice requests the base station to allocate a network resource. Afterthe first terminal device determines the network resource allocated bythe base station, the second terminal device searches for the networkresource allocated by the base station in a timeslot, at a frequency, orin a code channel, and when finding the network resource, the secondterminal device accesses the target device in the network according tothe network resource by using the first terminal device.

Optionally, the method for allocating a network resource may furtherinclude:

receiving, by the first terminal device, a correspondence that isbetween a channel and the network resource allocated by the base stationand is sent by the base station, where the correspondence is configuredto indicate a network resource used by a synchronization channel, abroadcast channel, or an access channel; and

connecting, by the first terminal device, the second terminal device tothe target device according to the correspondence.

For example, the first terminal device determines, according to theallocation information of the network resource allocated by the basestation, that frequency resources allocated by the base station are twofrequency bands: 890 MHz to 915 MHz and 890 MHz to 909 MHz. The firstterminal device may further determine, according to the correspondencebetween the channel and the network resource, that the frequencyresources allocated by the base station are 890 MHz to 915 MHz used totransmit a synchronization channel and 890 MHz to 909 MHz used totransmit an access channel. Used as the CF UE, the first terminal deviceuses a synchronization channel and a broadcast channel at 890 MHz to 915MHz, uses an access channel at 890 MHz to 909 MHz, and broadcasts, inthe broadcast channel, indication information used to indicate that afrequency band in which an access channel is used is 890 MHz to 909 MHz.Used as an AC UE, the second terminal device may determine, by searchinga whole wireless frequency band, that the first terminal device uses asynchronization channel and a broadcast channel at 890 MHz to 915 MHz;after channel synchronization is performed, reads the indicationinformation broadcasted by the first terminal device in the broadcastchannel; and determines, according to the indication information, that afrequency band in which the first terminal device uses an access channelis 890 MHz to 909 MHz. The second terminal device initiates access byusing an access channel at 890 MHz to 909 MHz and access the targetdevice in the network by using the first terminal device.

For another example, the first terminal device determines, according tothe allocation information of the network resource, that the networkresource allocated by the base station is a code channel 1 and a codechannel 2; the first terminal device uses a synchronization channel anda broadcast channel in the code channel 1 and uses an access channel inthe code channel 2, and the first terminal device broadcasts, in thebroadcast channel, indication information used to indicate that thefirst terminal device uses an access channel in the code channel 2. Bysearching all code channels, the second terminal device determines thatthe first terminal device uses a synchronization channel and a broadcastchannel in the code channel 1; after performing channel synchronizationby using the synchronization channel, the second terminal device readsthe indication information broadcasted in the broadcast channel anddetermines, according to the indication information, that the firstterminal device uses an access channel in the code channel 2; the secondterminal device initiates, by using the access channel in the codechannel 2, an access process to access the target device in the network.

Optionally, the allocation information of the network resource receivedby the first terminal device is sent by the base station to the firstterminal device by using signaling or by broadcasting.

For example, when the first terminal device requests the base station toallocate a network resource, the base station may encapsulate allocationinformation of the network resource in RRC signaling and send the RRCsignaling to the first terminal device. The base station may alsobroadcast the allocation information of the network resource in aserving cell of the base station, and the first terminal device mayacquire the allocation information of the network resource from thebroadcast.

For example, in a schematic diagram of network resource allocation shownin FIG. 3b , a base station allocates a network resource to a firstterminal device, and the first terminal device may determine, accordingto allocation information of the network resource sent by the basestation, that the network resource is subframes 2, 3, and 6 anddetermines, according to a correspondence that is sent by the basestation and is between a channel and a subframe, that in a case in whichthe second terminal device accesses the target device by using the firstterminal device, the first terminal device uses a synchronizationchannel in the subframe 2, uses a broadcast channel in the subframe 3,and uses an access channel in the subframe 6. The first terminal devicemay broadcast, in the broadcast channel used by the subframe 3,indication information used to indicate that the first terminal deviceuses an access channel in the subframe 6. By searching varioussubframes, the second terminal device determines that the first terminaldevice uses a synchronization channel and performs channelsynchronization in the subframe 2, determines that the first terminaldevice uses a broadcast channel in the subframe 3, and learns from thebroadcast channel that the first terminal device uses an access channelin the subframe 6. The second terminal device accesses the target devicein the network by using the access channel in the subframe 6 and thefirst terminal device.

In the prior art, a CF UE uses its capability to acquire, in acontention manner, a network resource that is configured to assist an ACUE in connecting to a target device in a network. Because not allnetwork resources are scheduled and allocated by a base station, it ispossible that a network resource occupied by the CF UE cannot assist theAC UE in accessing the network or the CF UE cannot occupy enough networkresources to serve a second terminal device due to a relatively weakcapability of the CF UE. In the used technical solution provided in thisembodiment of the present invention, the base station allocates, to afirst terminal device, a network resource that is configured to assistthe second terminal device in connecting to the target device. Thenetwork resource is not obtained in the contention manner by the firstterminal device by using its capability. Because the base station has afunction of scheduling a terminal device served by the base station, thebase station can easily learn which network resource is available, andwhich network resource can more efficiently assist the second terminaldevice in accessing the network. Therefore, a problem of resource wastecaused by that a network resource is occupied by the CF UE by contentionis avoided. Network resources are reduced and user experience of thesecond terminal device is improved.

One aspect of embodiments of the present invention further provides amethod for connecting to a target device in a network, where the methodis a further extension of a method embodiment shown in FIG. 2 or FIG. 3.A concept and a process in the embodiment shown in FIG. 2 or FIG. 3 isstill applicable to this embodiment. FIG. 4 shows a schematic flowchartof a method for connecting to a target device in a network, where themethod includes the following content:

401. A second terminal device determines a network resource used by afirst terminal device, where the network resource is used by the secondterminal device to access a target device by using the first terminaldevice, and the network resource is allocated by a base station. Thefirst terminal device is a terminal of a serving cell of the basestation, and the second terminal device is a terminal that utilizes thefirst terminal device to access the target device in a network.

As an example, the first terminal device may broadcast allocationinformation of the network resource used by the first terminal device.If the second terminal device utilizes the first terminal device toaccess the target device in a network, the second terminal device mayread the allocation information of the network resource from thebroadcast, so as to determine the network resource used by the firstterminal device.

As an example, the second terminal device may search all timeslotresources, frequency resources, or code channel resources. If the secondterminal device can access the target device in the network in atimeslot, at a frequency, or in a code channel by using the firstterminal device, the timeslot, the frequency, or the code channel is thenetwork resource used by the first terminal device.

402. The second terminal device accesses the target device according tothe network resource by using the first terminal device.

Optionally, that the second terminal device accesses the target deviceaccording to the network resource by using the first terminal deviceincludes:

the second terminal device determines a correspondence between a channeland the network resource according to the network resource used by thefirst terminal device, where the correspondence is configured toindicate a network resource used by a synchronization channel, abroadcast channel, or an access channel; the second terminal deviceaccesses the target device according to the correspondence between thechannel and the network resource by using the first terminal device.

As an example, after the second terminal device determines a timeslotresource, a frequency resource, or a code channel resource that is usedby the first terminal device to assist the second terminal device inconnecting to the target device, the second terminal device may furtherperform detection on the timeslot resource, the frequency resource, orthe code channel resource; determine a correspondence between a channeland the timeslot resource, the frequency resource, or the code channelresource; establish a connection to the first terminal device accordingto the correspondence; and access the target device in the network byusing the first terminal device. The second terminal device may accessthe target device according to the correspondence by using the firstterminal device.

In the prior art, a CF UE uses its capability to acquire, in acontention manner, a network resource that is configured to assist an ACUE in connecting to a target device in a network. Because not allnetwork resources are scheduled and allocated by a base station, it ispossible that a network resource occupied by the CF UE cannot assist theAC UE in accessing the network or the CF UE cannot occupy enough networkresources to serve a second terminal device due to a relatively weakcapability of the CF UE. In the used technical solution provided in thisembodiment of the present invention, the base station allocates, to afirst terminal device, a network resource that is configured to assistthe second terminal device in connecting to the target device. Thenetwork resource is not obtained in the contention manner by the firstterminal device by using its capability. Because the base station has afunction of scheduling a terminal device served by the base station, thebase station can easily learn which network resource is available, andwhich network resource can more efficiently assist the second terminaldevice in accessing the network. Therefore, a problem of resource wastecaused by that a network resource is occupied by the CF UE by contentionis avoided. Network resources are reduced and user experience of thesecond terminal device is improved.

An embodiment of the present invention further provides a schematicdiagram, shown in FIG. 5, of system interaction of a method forconnecting to a target device in a network. In this embodiment, a firstterminal device is CF UE, and a second terminal device is AC UE. Thisembodiment includes the following content:

501. In a case in which the first terminal device (UE1) is determined asthe CF UE and is required to provide a network resource that is used bythe second terminal device (UE2) to access a target device in a network,the first terminal device sends request information to a base station,where the request information is configured to request the base stationto allocate the network resource, and the network resource allocated bythe base station is used by the second terminal device to access thetarget device by using the first terminal device. Optionally, thenetwork resource includes a timeslot resource, a frequency resource,and/or a code channel resource.

502. The base station sends allocation information of the networkresource to the first terminal device by using a broadcast or RRCsignaling. Certainly, the base station may also send the allocationinformation of the network resource to the first terminal device byusing another manner. Optionally, if the base station learns in advancethat the second terminal device is to access the target device in thenetwork by using the first terminal device, the base station maydirectly send the allocation information of the network resource to thefirst terminal device by using the broadcast or the signaling, insteadof allocating the network resource by the base station to the firstterminal device after the first terminal device requests the basestation to allocate a network resource. In this case, step 501 isoptional.

503. The first terminal device determines, according to the receivedallocation information of the network resource, the network resourceallocated by the base station such as a timeslot, a frequency, or a codechannel, and sends data in channels such as an SCH, a BCH, and an RACHaccording to the network resource, where the data may includesynchronization data sent in the SCH by the first terminal deviceaccording to the network resource, broadcast data sent in the BCH by thefirst terminal device according to the network resource, and indicationinformation that is included in the broadcast data and is configured toindicate the RACH corresponding to the first terminal device accordingto the network resource.

504. The second terminal device determines the network resource bysearching or monitoring, determines a correspondence between a channeland the network resource in a searching or monitoring process accordingto the network resource, performs channel synchronization with an SCH ofthe first terminal device according to the correspondence between thechannel and the network resource, determines a BCH corresponding to thenetwork resource used by the first terminal device, and reads, from theBCH, an RACH corresponding to the network resource that is used.

505. The second terminal device accesses the target device by using thefirst terminal device and according to the RACH corresponding to thenetwork resource.

In the prior art, a CF UE uses its capability to acquire, in acontention manner, a network resource that is configured to assist an ACUE in connecting to a target device in a network. Because not allnetwork resources are scheduled and allocated by a base station, it ispossible that a network resource occupied by the CF UE cannot assist theAC UE in accessing the network or the CF UE cannot occupy enough networkresources to serve a second terminal device due to a relatively weakcapability of the CF UE. In the used technical solution provided in thisembodiment of the present invention, the base station allocates, to afirst terminal device, a network resource that is configured to assistthe second terminal device in connecting to the target device. Thenetwork resource is not obtained in the contention manner by the firstterminal device by using its capability. Because the base station has afunction of scheduling a terminal device served by the base station, thebase station can easily learn which network resource is available, andwhich network resource can more efficiently assist the second terminaldevice in accessing the network. Therefore, a problem of resource wastecaused by that a network resource is occupied by the CF UE by contentionis avoided. Network resources are reduced and user experience of thesecond terminal device is improved.

In still another aspect, an embodiment of the present invention providesa base station, where the base station may be a base station in any oneof the method embodiments shown in FIGS. 2 to 5. FIG. 6 shows aschematic structural diagram of the base station according to thisembodiment of the present invention, where the base station includes:

a receiving unit 61, configured to receive request information sent by afirst terminal device, where the request information is configured torequest the base station to allocate a network resource, the networkresource allocated by the base station is used by a second terminaldevice to access a target device by using the first terminal device, andoptionally, the network resource includes a timeslot resource, afrequency resource, and/or a code channel resource; and

a first sending unit 62, configured to send allocation information ofthe network resource to the first terminal device, where the allocationinformation is configured to indicate the network resource allocated bythe base station.

In this embodiment, the first terminal device is a terminal of a servingcell of the base station, and the second terminal device is a terminalthat utilizes the first terminal device to access the target device.

Optionally, the first sending unit 62 is specifically configured to sendthe allocation information of the network resource to the first terminaldevice by using signaling or by broadcasting.

Optionally, the network resource allocated by the base station includesa timeslot, a frequency, or a code channel used in a case in which thesecond terminal device accesses the target device by using the firstterminal device.

Optionally, the base station further includes:

a determining unit 63, configured to determine a correspondence betweena channel and the network resource according to the network resourceallocated by the base station, where the correspondence is configured toindicate a network resource used by a synchronization channel, abroadcast channel, or an access channel; and

a second sending unit 64, configured to send the correspondence that isbetween the channel and the network resource and is determined by thedetermining unit 63 to the first terminal device.

In this embodiment, the first sending unit 62 and the second sendingunit 64 may be integrated to be used as a transmitter of the basestation. The determining unit 63 may be a processor of the base station,and the receiving unit 61 may be a receiver of the base station.

In still another aspect, an embodiment of the present invention providesa first terminal device, where the first terminal device may be a firstterminal device in any one of the method embodiments shown in FIG. 2 toFIG. 5. FIG. 7 shows a schematic structural diagram of the firstterminal device, where the first terminal device includes:

a sending unit 71, configured to send request information to a basestation, where the request information is configured to request the basestation to allocate a network resource, the network resource is used bya second terminal device to access a target device by using the firstterminal device, and optionally, the network resource includes atimeslot resource, a frequency resource, and/or a code channel resource;and

a first receiving unit 72, configured to receive allocation informationof the network resource sent by the base station, where the allocationinformation is configured to indicate the network resource allocated bythe base station.

In this embodiment, the first terminal device is a terminal served by acell of the base station, and the second terminal device is a terminalthat utilizes the first terminal device to access the target device.

Optionally, the allocation information is sent by the base station tothe first terminal device by using signaling or by broadcasting.

Optionally, the first terminal device further includes:

a second receiving unit 74, configured to receive a correspondence thatis between a channel and the network resource and is sent by the basestation, where the correspondence is configured to indicate a networkresource used by a synchronization channel, a broadcast channel, or anaccess channel; and

an access unit 73, configured to enable the second terminal device toaccess the target device according to the correspondence between thechannel and the network resource.

The first receiving unit 72 and the second receiving unit 74 in thisembodiment may be integrated to be used as a receiver of the firstterminal device.

The sending unit 71 may be a transmitter of the first terminal device,and the access unit 73 may be a processor of the first terminal device.

In still another aspect, an embodiment of the present invention providesa second terminal device, and as shown in FIG. 8, the second terminaldevice includes:

a determining unit 81, configured to determine a network resource usedby a first terminal device, where the network resource is used by thesecond terminal device to access a target device in a network by usingthe first terminal device, the network resource is allocated by a basestation, and optionally, the network resource includes a timeslotresource, a frequency resource, or a code channel resource; and

an access unit 82, configured to enable the second terminal device toaccess the target device in the network according to the networkresource by using the first terminal device.

In this embodiment, the first terminal device is a terminal of a servingcell of the base station, and the second terminal device is a terminalthat utilizes the first terminal device to access the target device in anetwork.

Optionally, the access unit 82 is specifically configured to determine acorrespondence between a channel and the network resource according tothe network resource obtained by the determining unit 81, where thecorrespondence is configured to indicate a network resource used by asynchronization channel, a broadcast channel, or an access channel; thesecond terminal device accesses the target device according to thecorrespondence by using the first terminal device.

As an example, the determining unit 81 may specifically performsearching or detection on a network resource that may be allocated bythe base station to the first terminal device, until a network resourcethat is actually allocated by the base station to the first terminaldevice is determined The access unit 82 may specifically perform channelsynchronization in a synchronization channel according to the networkresource actually allocated by the base station to the first terminaldevice, and read an access channel that is indicated in a broadcastchannel and is corresponding to the network resource that is allocatedby the base station and used by the first terminal device, so as todetermine the correspondence between the network resource and thechannel and further access the target device in the network in theaccess channel.

In this embodiment, the determining unit 81 may be a processor of thesecond terminal device, and the access unit 82 may be a receiver of thesecond terminal device.

In the prior art, a CF UE uses its capability to acquire, in acontention manner, a network resource that is configured to assist an ACUE in connecting to a target device in a network. Because not allnetwork resources are scheduled and allocated by a base station, it ispossible that a network resource occupied by the CF UE cannot assist theAC UE in accessing the network or the CF UE cannot occupy enough networkresources to serve a second terminal device due to a relatively weakcapability of the CF UE. By using the base station, the first terminaldevice, and the second terminal device that are provided in theembodiments of the present invention, the base station allocates, to thefirst terminal device, a network resource that is configured to assistthe second terminal device in connecting to the target device. Thenetwork resource is not obtained in the contention manner by the firstterminal device by using its capability. Because the base station has afunction of scheduling a terminal device served by the base station, thebase station can easily learn which network resource is available, andwhich network resource can more efficiently assist the second terminaldevice in accessing the network. Therefore, a problem of resource wastecaused by that a network resource is occupied by the CF UE by contentionis avoided. Network resources are reduced and user experience of thesecond terminal device is improved.

In still another aspect, an embodiment of the present invention furtherprovides a base station. FIG. 9 shows a schematic structural diagram ofthe base station, and the base station includes: a processor 901, acommunication interface 902, a memory 903, and a bus 904. The processor901, the communication interface 902, and the memory 903 are connectedby using the bus 904. The memory 903 is configured to store computerprogram code, where the program code includes:

receiving request information sent by a first terminal device, where therequest information is configured to request the base station toallocate a network resource, and the network resource allocated by thebase station is used by a second terminal device to access a targetdevice by using the first terminal device; and

sending allocation information of the network resource to the firstterminal device, where the allocation information is configured toindicate the network resource allocated by the base station, the firstterminal device is a terminal of a serving cell of the base station, andthe second terminal device is a terminal that utilizes the firstterminal device to access the target device in a network.

The processor 901 is configured to execute the computer code stored inthe memory 903.

Optionally, in the code stored in the memory 903, the sending theallocation information of the network resource to the first terminaldevice includes: sending the allocation information of the networkresource to the first terminal device by using signaling or bybroadcasting.

Optionally, the network resource allocated by the base station includesa timeslot, a frequency, or a code channel used in a case in which thesecond terminal device accesses the target device by using the firstterminal device.

Optionally, the program code of the foregoing method further includes:determining a correspondence between a channel and the network resourceaccording to the network resource allocated by the base station, wherethe correspondence is configured to indicate a network resource used bya synchronization channel, a broadcast channel, or an access channel;and sending the correspondence to the first terminal device.

The base station provided in this embodiment of the present inventionmay execute an action executed by a base station in the embodiments ofthe method for allocating a network resource. For details, refer to adescription in any one of the method embodiments shown in FIGS. 2 to 5.

In still another aspect, an embodiment of the present invention furtherprovides a first terminal device. FIG. 10 shows a schematic structuraldiagram of the first terminal device, and the first terminal deviceincludes: a processor 1001, a communication interface 1002, a memory1003, and a bus 1004. The processor 1001, the communication interface1002, and the memory 1003 are connected by using the bus 1004. Thememory 1003 is configured to store computer program code, where thecomputer program code includes:

sending request information to a base station, where the requestinformation is configured to request the base station to allocate anetwork resource, and the network resource allocated by the base stationis used by a second terminal device to access a target device by usingthe first terminal device; and

receiving allocation information of the network resource sent by thebase station, where the allocation information of the network resourceis used by the first terminal device to determine the network resource,the first terminal device is a terminal of a serving cell of the basestation, and the second terminal device is a terminal that utilizes thefirst terminal device to access the target device in a network.

The processor 1001 is configured to execute the computer program codestored in the memory 1003.

Optionally, in the computer program code stored in the memory 1003, theallocation information of the network resource is sent by the basestation to the first terminal device by using signaling or bybroadcasting.

Optionally, the computer program code stored in the memory 1003 mayfurther include:

receiving, by the first terminal device, a correspondence that isbetween a channel and the network resource and is sent by the basestation, where the correspondence between the channel and the networkresource is configured to indicate a network resource used by asynchronization channel, a broadcast channel, or an access channel; andconnecting, by the first terminal device, the second terminal device tothe target device according to the correspondence.

Optionally, the computer program code stored in the memory 1003 mayfurther include:

the network resource allocated by the base station includes a timeslot,a frequency, or a code channel used in a case in which the secondterminal device accesses the target device by using the first terminaldevice.

The first terminal device provided in this embodiment of the presentinvention may execute an action executed by a first terminal device inthe method embodiments. For details, refer to any one of the methodembodiments shown in FIGS. 2 to 5.

In still another aspect, an embodiment of the present invention furtherprovides a second terminal device, and as shown in FIG. 11, the secondterminal device includes:

a memory 1101, configured to store computer program code, where thecomputer program code includes:

determining a network resource used by a first terminal device, wherethe network resource is used by the second terminal device to access atarget device in a network by using the first terminal device, and thenetwork resource is allocated by a base station; and connecting to thetarget device in the network according to the network resource by usingthe first terminal device, where the first terminal device is a terminalof a serving cell of the base station, and the second terminal device isa terminal that utilizes the first terminal device to access the targetdevice.

Optionally, connecting to, by the second terminal device, the targetdevice in the network according to the network resource by using thefirst terminal device includes:

determining, by the second terminal device, a correspondence between achannel and the network resource according to the network resource,where the correspondence is configured to indicate a network resourceused by a synchronization channel, a broadcast channel, or an accesschannel; and connecting to, by the second terminal device, the targetdevice according to the correspondence between the channel and thenetwork resource by using the first terminal device.

The second terminal device provided in this embodiment of the presentinvention may execute an action executed by a second terminal device inthe method embodiments. For details, refer to any one of the methodembodiments shown in FIG. 2 to FIG. 5.

Optionally, the second terminal device in this embodiment of the presentinvention may further include a bus 1103 that is configured to connectthe memory 1101 and a processor 1102.

In the prior art, a CF UE uses its capability to acquire, in acontention manner, a network resource that is configured to assist an ACUE in connecting to a target device in a network. Because not allnetwork resources are scheduled and allocated by a base station, it ispossible that a network resource occupied by the CF UE cannot assist theAC UE in accessing the network or the CF UE cannot occupy enough networkresources to serve a second terminal device due to a relatively weakcapability of the CF UE. By using the base station, the first terminaldevice, and the second terminal device that are provided in theembodiments of the present invention, the base station allocates, to thefirst terminal device, a network resource that is configured to assistthe second terminal device in connecting to the target device. Thenetwork resource is not obtained in the contention manner by the firstterminal device by using its capability. Because the base station has afunction of scheduling a terminal device served by the base station, thebase station can easily learn which network resource is available, andwhich network resource can more efficiently assist the second terminaldevice in accessing the network. Therefore, a problem of resource wastecaused by that a network resource is occupied by the CF UE by contentionis avoided. Network resources are reduced and user experience of thesecond terminal device is improved.

The embodiments in this specification are all described in a progressivemanner, for same or similar parts in the embodiments, reference may bemade to these embodiments, and each embodiment focuses on a differencefrom other embodiments. Especially, a device embodiment is basicallysimilar to a method embodiment, and therefore is described briefly; forrelated parts, reference may be made to partial descriptions in themethod embodiment.

A person of ordinary skill in the art may understand that all or some ofthe processes of the methods in the embodiments may be implemented by acomputer program instructing relevant hardware. The program may bestored in a computer readable storage medium. When the program runs, theprocesses of the methods in the embodiments are performed. The foregoingstorage medium may include: a magnetic disk, an optical disc, aread-only memory (Read-Only Memory, ROM), or a random access memory(Random Access Memory, RAM).

The foregoing descriptions are merely specific embodiments of thepresent invention, but are not intended to limit the protection scope ofthe present invention. Any variation or replacement readily figured outby a person skilled in the art within the technical scope disclosed inthe present invention shall fall within the protection scope of thepresent invention. Therefore, the protection scope of the presentinvention shall be subject to the protection scope of the claims.

What is claimed is:
 1. A method for allocating a network resource,comprising: sending, by a first terminal device, request information toa base station, wherein the request information is configured to requestthe base station to allocate a network resource, and the networkresource allocated by the base station is used by a second terminaldevice to access a target device by using the first terminal device, andthe target device is another base station separate from the basestation; receiving, by the first terminal device, allocation informationof the network resource sent by the base station, wherein the allocationinformation is configured to indicate the network resource allocated bythe base station; and broadcasting, by the first terminal device, theallocation information of the network resource to the second terminaldevice, wherein the first terminal device is a terminal served by a cellof the base station, and the second terminal device is a terminal notserved by a cell of the base station that utilizes the first terminaldevice to access the target device.
 2. The method for allocating anetwork resource according to claim 1, wherein the allocationinformation of the network resource allocated by the base station issent by the base station to the first terminal device by using signalingor by broadcasting.
 3. The method for allocating a network resourceaccording to claim 1, further comprising: receiving, by the firstterminal device, a correspondence between a channel and the networkresource that is sent by the base station, wherein the correspondence isconfigured to indicate a network resource used by a synchronizationchannel, a broadcast channel, or an access channel; and connecting, bythe first terminal device, the second terminal device to the targetdevice according to the correspondence.
 4. The method according to claim1, wherein the network resource allocated by the base station comprisesa timeslot, a frequency, or a code channel used in a case in which thesecond terminal device accesses the target device by using the firstterminal device.
 5. The method for allocating a network resourceaccording to claim 1, wherein the target device is selected from thegroup consisting of a neighboring base station and a communicationsdevice in the cell of the base station.
 6. The method for allocating anetwork resource according to claim 1, wherein before sending, by thefirst terminal device, request information to a base station, the methodfurther comprises: receiving, by the first terminal device, a requestfor providing the second terminal device with a service of connecting tothe target device from the second terminal device.
 7. The method forallocating a network resource according to claim 1, further comprising:sending, by the first terminal device, an identifier of the firstterminal device to the second terminal device.
 8. A terminal device,comprising: a transmitter configured to send request information to abase station, wherein the request information is configured to requestthe base station to allocate a network resource, and the networkresource allocated by the base station is used by a second terminaldevice to access a target device by using the terminal device, and thetarget device is another base station separate from the base station; areceiver configured to receive allocation information of the networkresource sent by the base station, wherein the allocation information isconfigured to indicate the network resource allocated by the basestation; and the transmitter configured to broadcast the allocationinformation of the network resource to the second terminal device,wherein the terminal device is a terminal served by a cell of the basestation, and the second terminal device is a terminal not served by acell of the base station that utilizes the terminal device to access thetarget device.
 9. The terminal device according to claim 8, wherein thetarget device is selected from the group consisting of a neighboringbase station and a communications device in the cell of the basestation.
 10. The terminal device according to claim 8, wherein theallocation information is sent by the base station to the terminaldevice by using signaling or by broadcasting.
 11. The terminal deviceaccording to claim 8, wherein the receiver is further configured to:receive a correspondence that is between a channel and the networkresource and is sent by the base station, wherein the correspondence isconfigured to indicate a network resource used by the synchronizationchannel, a broadcast channel, or an access channel; and the terminalfurther comprises a processor, configured to enable the second terminaldevice to access the target device according to the correspondence. 12.A method for allocating a network resource, comprising: receiving, by asecond terminal device, allocation information of a network resourcebroadcast by a first terminal device, wherein the allocation informationindicates the network resource is allocated by a base station, and thenetwork resource allocated by the base station is used by the secondterminal device to access a target device by using the first terminaldevice, and the target device is another base station separate from thebase station; accessing, by the second terminal device, the targetdevice by using the first terminal device, wherein the first terminaldevice is a terminal served by a cell of the base station, and thesecond terminal device is a terminal not served by a cell of the basestation that utilizes the first terminal device to access the targetdevice.
 13. The method for allocating a network resource according toclaim 12, further comprising: sending, by the second terminal device, arequest for providing the second terminal device with a service ofconnecting to the target device to the first terminal device.
 14. Themethod for allocating a network resource according to claim 12, furthercomprising: receiving, by the second terminal device, a identifier ofthe first terminal device from the first terminal device.
 15. A secondterminal device, comprising: a memory; and a processor coupled to thememory and configured to: receive allocation information of a networkresource broadcast by a first terminal device, wherein the allocationinformation indicates the network resource is allocated by a basestation, and the network resource allocated by the base station is usedby the second terminal device to access a target device by using thefirst terminal device, and the target device is another base stationseparate from the base station; and access the target device by usingthe first terminal device, wherein the first terminal device is aterminal served by a cell of the base station, and the second terminaldevice is a terminal not served by a cell of the base station thatutilizes the first terminal device to access the target device.